package com.pipi.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pipi.dao.pojo.Disk;
import com.pipi.entity.Result;
import com.pipi.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.Date;
import java.util.List;

/**
 * @author asus
 * @description 针对表【user(用户表)】的数据库操作Mapper
 * @createDate 2025-04-02 11:13:34
 * @Entity com.pipi.entity.User
 */

@Mapper
public interface MyUserMapper extends BaseMapper<User> {

    public List<User> selectUser(@Param("userStatus") String userStatus);

    public List<User> selectAll();

    public List<Disk> getDiskByUserOpenId(String openId);

    public User getUserInfoByOpenId(@Param("userOpenid") String userOpenid);

    public Boolean updateUserInfo(@Param("userOpenid") String userOpenid,
                                  @Param("userName") String userName,
                                  @Param("userAge") Integer userAge,
                                  @Param("avatarUrl") String avatarUrl,
                                  @Param("updateTime") Date updateTime);

    public Boolean addUserHealthDataByOpenId(@Param("userOpenid") String userOpenId,
                                             @Param("bloodPressure") String bloodPressure,
                                             @Param("bloodGlucose") String bloodGlucose,
                                             @Param("bloodFat") String bloodFat,
                                             @Param("createTime") Date createTime);


    void addUser(@Param("userOpenid") String userOpenid,
                 @Param("userName") String userName,
                 @Param("avatarUrl") String avatarUrl,
                 @Param("createTime") Date createTime);
    public int selectUserByOpenId(String userOpenid);

    Integer loginNursingStaff(@Param("username") String username, @Param("password") String password);

    User getNursingStaffInfoByOpenId(@Param("openId") String openId);
}
